package com.cmcc.groupcontacts.firewall.business;

import android.content.ContentResolver;
import android.content.Context;
import android.content.ContextWrapper;

import com.cmcc.groupcontacts.MainApp;

/**
 * 业务处理抽象基类
 * 
 * @author 
 * 
 */
public abstract class BaseBusiness {
	protected Context context;
	protected ContextWrapper cw;
	protected ContentResolver cr;

	public BaseBusiness() {
		this(MainApp.getContext());
	}
	
	public BaseBusiness(Context context) {
		this((ContextWrapper) context);
	}
	
	public BaseBusiness(ContextWrapper cw) {
		this(cw, cw.getContentResolver());
	}

	public BaseBusiness(ContextWrapper cw, ContentResolver cr) {
		this.context = cw;
		this.cw = cw;
		this.cr = cr;
	}
	
	protected String getString(int resId) {
		return cw.getString(resId);
	}
}
